package com.polaris.live.widget.match_botton

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import com.polaris.live.common.constant.PagConst.FREE_CARD_PAG
import com.polaris.live.common.constant.PagConst.USER_SPACE_LONG_PAG
import com.polaris.live.common.constant.PagConst.USER_SPACE_PHONE_PAG
import com.polaris.live.databinding.WidgetFreeMatchBinding

/**
 * FreeMatchView
 *
 * @author Created by 半仙 on 2023/10/31/031 20:21
 */
class FreeMatchView(context: Context, attributeSet: AttributeSet) :
    RelativeLayout(context, attributeSet) {

    private val mBinding = WidgetFreeMatchBinding.inflate(LayoutInflater.from(context), this, true)

    init {
        mBinding.callIcon.apply {
            path = FREE_CARD_PAG
            setRepeatCount(-1)
            play()
        }
        mBinding.pagView.apply {
            path = USER_SPACE_LONG_PAG
            setRepeatCount(-1)
            play()
        }
        mBinding.pagPhone.apply {
            visibility = View.VISIBLE
            path = USER_SPACE_PHONE_PAG
            setRepeatCount(-1)
            play()
        }
    }
}